MediaWiki talk:ShowHide2/code.js
Not clear about usage model It took me a while to get around to testing your revised code. See this test page. *You need to use your personal monaco.js at that test wiki to specify which javascript to use and then your monaco.css to apply suitable styles. If this did solve your specific problem it does not appear to be a solution for the general case. Specifically: # I cannot successfully separate the styles for the heading text from those for the span.collapseLink button. #* This affects the center alignment of the header text as the width of the toggle button changes. # The text used on either side of the span.collapseLink become part of the heading text. #* This also affects the center alignment of the heading text. Perhaps I haven't understood the usage model you intended but it seems to me that the fundamental problem of the heading text remaining in the same container as the span.collapseLink still persists. -- najevi 03:44, November 22, 2009 (UTC) :My main issue is backward compatibility... :As explain before one of the issues is the off-center of the title this was (maybe still is) an issue with tables hence why i have always use "Navframe div" instead of "collapse table" also because div respect more the widths compare to tables hide/show, and the final reason is because it lets me differentiate the code faster as i heavily use table nesting so it helps me keep sometimes sections separate with out doing fancy hidden/comment stuff and keeping simple my functionality. :Now if you have play with the code float in css you will know that having the element you want to float before the text will yield different style effects oppose to having the element you want to float after the text. Be right or left. While you cant notice this on 1 line you can see the difference in multiple lines. :Hence why i change from append to prepend in the JS. :Also i resolved the issue of the [] not being warp in navframe because in the past(original/wikipedia/wikia-helppages) navframe have the brackets inside the link as they where an integrating part oppose to the table version where it is separate. I like how Dantman resolve your brackets request doing this optional of easy to modify for every wiki. (on a minute note i had try to do the same table effect on navframe but fail as the JS i knew was not enough as what the old JS codes versions does it is a "for" that searches for specific conditions that i didn't know how to handle other way). :What i dont understand if Dantmans intentions are to defunct Navframe by doing this elegan but ugly style version of navframe and force users/admins to migrate to tables or its his styling preference. :So the only modifications (as said before) was to: :*a) warp the toglebutton in another tag with the old named navtoggle. :*b) instead of append to prepend (like the old navframe and like it does in tables) :*c) there is an addition of complementary CSS (for users with old JS versions this is not needed) :This 3 changes will give full compatibility with all the divs ever coded in the OLD JS versions. Every single wikis where it uses the OLD JS versions can simply go and change their old JS code for the import code and their CSS styling will be unaffected giving as i said full stylish compatibility. And will not require any modification to the CSS unless is desired to remove the exceeding CSS and leave the ones i put on the installation instructions. :Now what i only needed was that Dantman warped the navframe togglebutton in another tag, so i could try to achieve via CSS my goal (since the fully center effect is achieve via CSS) as he didn't do it hence why i created this version and tweak the append and prepend thing thought my style preference is to have my floating button at the top instead of the bottom (as i use headers with 2 or more lines) thought im not picky about adding stuff, so if you want I can add a variable (not as elegant as Dantman) to choose whether to append or to prepend is a matter you tell me, thought your example/testing models differ as they are requiring that clearing div you created plus the de-attached of the navhead you did in your version, making mines and Dantmans versions incompatible to produce such effects you may be expecting. Last to mention the tests you did where wrong you are only using partially the CSS code your require and doing a left/left, center/center, right/right will stack the words since due to the css the navtoggle/collapsebutton are free and are not interfering with the navhead text :--Cizagna (Discusión) • Helper • Central hispana 17:20, 28 November 2009 (UTC)